import request from '@/utils/request'

// 查询订单列表  /order/list POST
export function listOrder(query) {
  return request({
    url: '/order/list?pageNum=' + query.pageNum + '&pageSize=' + query.pageSize,
    method: 'post',
    data: query
  })
}

// 删除 /order/delete/{id} GET
export function delOrder(id) {
  return request({
    url: '/order/delete/' + id,
    method: 'get'
  })
}
// add /order/add POST
export function addOrder(data) {
  return request({
    url: '/order/add',
    method: 'post',
    data: data
  })
}

// 批量提交 /order/batch POST
export function batchOrder(data) {
  return request({
    url: '/order/addBatch',
    method: 'post',
    data: data
  })
}

// /price-config/list GET
export function listPriceConfig(query) {
  return request({
    url: '/price-config/list',
    method: 'get',
    params: query
  })
}

// /price-config/update POST
export function updatePriceConfig(data) {
  return request({
    url: '/price-config/edit',
    method: 'post',
    data: data
  })
}

// /price-config/getPrice GET
export function getPrice(query) {
  return request({
    url: '/price-config/getPrice',
    method: 'get',
    params: query
  })
}
// /order/myCustom
export function myCustom(query) {
  return request({
    url: '/order/myCustom',
    method: 'post',
    data: query
  })
}
// /order/bussiness
export function bussiness(query) {
  return request({
    url: '/order/bussiness',
    method: 'post',
    data: query
  })
}
// /order/areaTrend
export function areaTrend(query) {
  return request({
    url: '/order/areaTrend',
    method: 'post',
    data: query
  })
}
// /order/bussiness-bingtu
export function bussinessBingtu(query) {
  return request({
    url: '/order/bussiness-bingtu',
    method: 'post',
    data: query
  })
}

// /system/dept/selectChildrenDeptAndCurDeptById
export function selectChildrenDeptAndCurDeptById(query) {
  return request({
    url: '/system/dept/selectChildrenDeptAndCurDeptById',
    method: 'get',
    params: query
  })
}
// /order/shelf/{id}
export function shelf(id) {
  return request({
    url: '/order/shelf/' + id,
    method: 'get'
  })
}
// /order/export
export function exportExcle(data) {
  return request({
    url: '/order/export',
    method: 'post',
    // responseType: 'blob',
    data

  })
}


// order/shelfJinpai/{id}
export function shelfJinpai(id) {
  return request({
    url: '/order/shelfJinpai/' + id,
    method: 'get'
  })
}
